﻿using Prism.Services.Dialogs;

namespace WPF.Core
{
    public static class DialogExtensions
    {
        public static async Task<IDialogResult> Question(this IHostDialogService dialog,
            string title = "温馨提示",
            string message = "确定执行当前操作?")
        {
            DialogParameters param = new DialogParameters();
            param.Add("Title", title);
            param.Add("Message", message);

            return await dialog.ShowDialogAsync("MsgView", param);
        }
    }
}
